﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class menu3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["name"] == null)
        {
            Response.Redirect("~/error.aspx?");
        }
        if (Session["power"].ToString() == "主管"||Session["power"].ToString()=="销售")
        {
            LinkButton1.Visible = false;
            LinkButton2.Visible = false;
            LinkButton3.Visible = true;
            LinkButton4.Visible = true;
            LinkButton5.Visible = true;
            LinkButton6.Visible = true;
        }
        else if (Session["power"].ToString() == "工程师")
        {
            LinkButton1.Visible = false;
            LinkButton2.Visible = false;
            LinkButton3.Visible = false;
            LinkButton4.Visible = true;
            LinkButton5.Visible = false;
            LinkButton6.Visible = false;
        }
        else if (Session["power"].ToString() == "仓库管理员")
        {
            LinkButton1.Visible = true;
            LinkButton2.Visible = true;
            LinkButton3.Visible = false;
            LinkButton4.Visible = false;
            LinkButton5.Visible = false;
            LinkButton6.Visible = false;
        }
        else
        {
            LinkButton1.Visible = true;
            LinkButton2.Visible = true;
            LinkButton3.Visible = true;
            LinkButton4.Visible = true;
            LinkButton5.Visible = true;
        }
    }

    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/RecordsListD.aspx?");
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/outRecordsListD.aspx?");
    }
    protected void LinkButton3_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/shiyan.aspx?");
    }
    protected void LinkButton4_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/outdan.aspx?");
    }
    protected void LinkButton5_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/shenhe.aspx?");
    }
    protected void LinkButton6_Click(object sender, EventArgs e)
    {

        Response.Redirect("~/buhuo.aspx?");
    }
}